<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/5/4
  Time: 10:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="java.util.*" %>
<%@ page import="java.lang.*" %>

<%@ page import="java.lang.Thread.State" %>
<%
    out.println("<B>Active Thread count = " + Thread.activeCount() + "</B><BR><BR>");
    Map<Thread, StackTraceElement[]> stackInfos = Thread.getAllStackTraces();
    Set<Thread> keySet = stackInfos.keySet();
    for (Thread tempThread : keySet) {
        StackTraceElement[] tempElement = stackInfos.get(tempThread);
        out.println("<fontcolor=blue>" + tempThread.getState() + "</font>&nbsp;");
        out.println("<fontcolor=green>" + tempThread.getName() + "</font>&nbsp;");
        out.println("<BR>");
        for (StackTraceElement element : tempElement) {
            out.println(element + "<BR>");
        }
        out.println("<BR><BR>");
    }
%>

